# add_subdirectory(core)
# add_subdirectory(framework)
# add_subdirectory(eigen)


include(${CMAKE_CURRENT_LIST_DIR}/core/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/eigen/CMakeLists.txt)
# include(${CMAKE_CURRENT_LIST_DIR}/framework/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/interface/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/util/CMakeLists.txt)

add_library(monolith_shared SHARED ${MONOLITH_BACKENDS_OBJECTS})
add_library(monolith_static STATIC ${MONOLITH_BACKENDS_OBJECTS})

set_target_properties("monolith_shared" PROPERTIES
    OUTPUT_NAME monolith
    LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/
    )

set_target_properties("monolith_static" PROPERTIES
    OUTPUT_NAME monolith
    ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/
    )
    
install(TARGETS monolith_shared monolith_static ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
install(FILES
    ${MONOLITH_BACKENDS_HEADS}
    DESTINATION ${CMAKE_BINARY_DIR}/include
)
